package com.itbaiwei.testday01.day01.annotation;

/**
 * Class: Main6
 * Description:
 * Author: haijun.xu
 * Date: 2025/4/25 15:40
 */
enum MyElementType1{
    TYPE,
    FIELD,
    METHOD;
    public String getchineseName(){
        switch (this){
            case TYPE:
                return "类，接口，枚举";
            case FIELD:
                return "字段，枚举的常量";
            case METHOD:
                return "方法中";
            default:
                return "不合法";
        }
    }
}
public class Main6 {
    public static void main(String[] args) {
        MyElementType1 field = MyElementType1.FIELD;
        String s = field.getchineseName();
        System.out.println(s);
    }
}
